<html>
<head><meta charset="utf-8"><title>cargo fix and #[test] code · edition 2021 · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/index.html">edition 2021</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/cargo.20fix.20and.20.23.5Btest.5D.20code.html">cargo fix and #[test] code</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="241585317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/cargo%20fix%20and%20%23%5Btest%5D%20code/near/241585317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/cargo.20fix.20and.20.23.5Btest.5D.20code.html#241585317">(Jun 04 2021 at 19:54)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="120518">@Eric Huss</span> -- do you know if <code>cargo fix</code> should work on <code>#[test]</code> functions?</p>



<a name="241585392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/cargo%20fix%20and%20%23%5Btest%5D%20code/near/241585392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/cargo.20fix.20and.20.23.5Btest.5D.20code.html#241585392">(Jun 04 2021 at 19:55)</a>:</h4>
<p>I think you need to pass <code>cargo fix --all-targets</code></p>



<a name="241585509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/cargo%20fix%20and%20%23%5Btest%5D%20code/near/241585509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/cargo.20fix.20and.20.23.5Btest.5D.20code.html#241585509">(Jun 04 2021 at 19:56)</a>:</h4>
<p>ack</p>



<a name="241585522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/cargo%20fix%20and%20%23%5Btest%5D%20code/near/241585522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/cargo.20fix.20and.20.23.5Btest.5D.20code.html#241585522">(Jun 04 2021 at 19:56)</a>:</h4>
<p>According to the man page, that is the default when using <code>--edition</code>.  Hopefully that is correct <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="241585553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/cargo%20fix%20and%20%23%5Btest%5D%20code/near/241585553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/cargo.20fix.20and.20.23.5Btest.5D.20code.html#241585553">(Jun 04 2021 at 19:56)</a>:</h4>
<p>hmm</p>



<a name="241585557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/cargo%20fix%20and%20%23%5Btest%5D%20code/near/241585557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/cargo.20fix.20and.20.23.5Btest.5D.20code.html#241585557">(Jun 04 2021 at 19:56)</a>:</h4>
<p>that didn't seem to work</p>



<a name="241585601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/cargo%20fix%20and%20%23%5Btest%5D%20code/near/241585601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/cargo.20fix.20and.20.23.5Btest.5D.20code.html#241585601">(Jun 04 2021 at 19:56)</a>:</h4>
<p>oh</p>



<a name="241585608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/cargo%20fix%20and%20%23%5Btest%5D%20code/near/241585608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/cargo.20fix.20and.20.23.5Btest.5D.20code.html#241585608">(Jun 04 2021 at 19:56)</a>:</h4>
<p>I'm being silly:)</p>



<a name="241585707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/cargo%20fix%20and%20%23%5Btest%5D%20code/near/241585707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/cargo.20fix.20and.20.23.5Btest.5D.20code.html#241585707">(Jun 04 2021 at 19:57)</a>:</h4>
<p>that does seem to work</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>